# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an

import sys
from PyQt5.QtWidgets import *


class QWIN(QWidget):
    def __init__(self):
        super(QWIN, self).__init__()
        btn1 = QPushButton("获取")
        btn2 = QPushButton("清除")

        btn1.clicked.connect(lambda: self.btm_click(1))
        btn2.clicked.connect(lambda : self.btm_click(2))

        layout = QHBoxLayout()
        layout.addWidget(btn1)
        layout.addWidget(btn2)

        self.setLayout(layout)

    def btm_click(self, n):
        print("Button {} 被按下了".format(n))
        QMessageBox.information(self,"信息提示框","Button {} 被按下了".format(n))

if __name__ == '__main__':
    app = QApplication(sys.argv)
    win = QWIN()
    win.show()
    sys.exit(app.exec_())
